home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / Moof / Goodies / MPW Goodies / MPW Goodies⁄DTS / UnmountProjector < prev    next >
Text File  |  2022-08-05  |  789b  |  39 lines

  1. #
  2. # UnmountProjector        Andrew Shebanow                1/30/89
  3. #
  4. # Modification History:
  5. #
  6. #
  7. # Script to unmount a project
  8. #
  9. #
  10.  
  11. # save exit status, since we are executing at global scope
  12. Set OldExit {Exit}
  13. Set Exit 0
  14.  
  15. # Get list of mounted projects
  16. Set ProjectNameList "`MountProject -pp -s -r | Sort -l`"
  17.  
  18. # Set up project specific items
  19. Set ProjName NIL
  20.  
  21. # Make sure we have at least one project mounted
  22. If "{ProjectNameList}" == ""
  23.     Alert "Cannot set project: no projects are mounted."
  24.     # restore previous state of {Exit}
  25.     Set Exit {OldExit}
  26.     Exit 0
  27. End
  28.  
  29. Set ProjName `GetListItem -r 16 -s -d {ProjectNameList} -m "Choose a project"` > Dev:Null ≥ Dev:Null
  30. if "{ProjName}" != NIL
  31.     UnmountProject "{ProjName}"
  32. End
  33.  
  34. # Update our menu
  35. ProjListMenu
  36.     
  37. # restore previous state of {Exit}
  38. Set Exit {OldExit}
  39.